subcalculations