refactored pause button to record