added methods to close processes