pause and unpause works

three lines of code added to handle pause and unpause event :D