update functions to use BuildQueryString instead of BuildQuery