added core data implementation