a swift demo of core data