separate network code from the data model