refactoring ahead of real back end datastore