implemented pause option