some silly functions to create a query string but this is a bad idea