added more core data functionality