adding support for withdraw agent then quitting