private function migrateData($legacySaveFile)
    {
        $data = $this->readJson($legacySaveFile);

        if (null === $data) {
            unlink($legacySaveFile);
            return null;
        }

        //lets check if the data is in the old format
        if (!isset($data['completed_exercises']) || !isset($data['current_exercise'])) {
            unlink($legacySaveFile);
            return null;
        }

        $completedExercises = $data['completed_exercises'];
        $availableExercises = $this->exerciseRepository->getAllNames();

        //check to see if this old data represents THIS workshop
        //if not we bail
        foreach ($completedExercises as $completedExercise) {
            if (!in_array($completedExercise, $availableExercises)) {
                return null;
            }
        }

        $userState = new UserState($data['completed_exercises'], $data['current_exercise']);
        $this->serialize($userState);

        unlink($legacySaveFile);
        return $userState;
    }