Added uniqueWithin function. Issue: #412