renamed var em to entityManager