Added forward and back functionality