simpler approach than reversible iterators
move cursor direction into class