added logic that reload tableview with core data