added delete functionality to core data