modified division to account for floting point