Changed floats to doubles