Moved the callback in the Entity class