draft for the math calculations