Made sure freq calculation was done as double