adds a way to override distinct (probably don't want to merge this)