Replaced floats with doubles