update controller to use doctrine ORM Entity instead of Model