set up core data and models