adding ability to stop capture