small beautification to value iteration