add shutdown method