single.py: refactoring