Changed entity to model