migrated core data. refactored for passing spec tests.