add a shutdown method