Changed the math a bit