renamed db.query -> db.conn