refactor Context#accepts()