Further optimization to searching