created schema for db, added methods to db.py