removed get_db and g.db