move converts to db.query module