added linear and binary search