added helper methods for calculations