init EntityManger in method so that it is easier to debug