changed getEntityManager to getManager