implemented pause button