modifying encoder to output float