added properly working back and forward buttons