implement floats encode
implement floats encode