refactor Context