add TernarySearch