fixed some of my math errors