optimize search with duplicated
accomplish array segments