move marshalling to QueryDecorator where it belongs