working forward and back