added search algorithm in sorted array