nona's unfinished impl of value iteration alg