changed floats to doubles