a much better way (?) of doing contextual mode