finished calculation functions, everything works, just going back to refactor