getting solution costs & update best solution (bugged)