added method to compare floats
formatting