add def and class to web.py