Added logic to find bin in the set