search function and iterators added