update the way qs is applied to the template