value iteration fix and change mode to 2