moving serializing from fields to api