updated to import Data.Ratio rather than Ratio