added core data to save and edit data