factory: add settings context manager