added DistinctBy utility method