probably fixed valueIteration()