calculations for efficiency