add iOS delegate and remove tree based search