added class for persisting context