working binary search using list