got rid of .to_d which was causing rounding issues