binary search, normal and recurent