had to bring distinct up to node, as PostGres does not like it