Begin to realize pause and resume function