let a function return the base_query