added db stuff to web.py