removed unecessary variables from the math