switched to double precision instead of float