implemented pause GUI function