fixed compiling errors, changed floats to doubles, and more