added backwards traversing