database.query has been changed to database.query_id in database.py