decode query strings etc