added pause design and partly working pause function