logic changed
Formula logic implemented