Add pause and resume functions