Finding the formula