calculation functions appear to be in order