use doubles instead of floats