use cascading's unique function for better performance