refactor the way an Entity is instanciated