Changed to TreeSet to run search in O(log n)