added pause feature