avoid unneccessary float calculations and conversions