checkpoint work
refactored to use contextmanager for test methods