WIP
contextlib.nested - thanks sduncan