made changes to calculations

made changes to calculations still have NaN error