defined version
added docstrings and comments
case will fail if used after context manager exits
default's callback is not required