because this class is called by both the api model and ui model