refactor pause