And I'd do those bits of calculation as helper functions.