add encoding for floats