convert data model to protocol
TODO extract protocol for models
cleanup old code