added core data stuff