created functions of linear and binary search.