adjust basepath config function to create query params on the fly