Changed from floats to doubles