converted floats to double and implemented serialization