Updated for math

Re-arranged the order of operations