converted ratios to floats

ratios were integer division, which didn't work as desired. casting the numerators to floats cures this ailment