added support for keeping arbitrary columns from joined query