added posHistory element back
this might be useful for exploration.  Tried to write a modified exploration algorithm but it is hard to get to work when the robot does u-turns.  Need to think about that for a while.