remove a hardcoded sql statement from insert_to_db function