according to PHPDoc this function shall return the entity