use $this->entity instead of just $entity