moved interactive functions to `ui.py`