refactor router.py
chapter11: web.py