added a method to handle the background context saving
commit