Changed my BinSearch to inner STL function upper_bound