properly set the raw_query func