move db operations into db.py