adds filter to uniqly sample from an array