added tests to ensure context is preserved