change entity to model