add takeFirst param to distinctBy to control which duplicates to preserve