getting all calculations to work together