added getentityManager method