add ref-columns, and distinct with new-columns