add context manager for with statement