calculating the height correctly and not being an idiot