change depricated getEntityManager to getManager