make the calculations more efficient