switch to core data