Pause function and few other things