create model and integrate core data