core data functions added