started work on the mdp again. got a reasonable method for computing the next direction