Adding code for persistence context