core data demo 3 revised