added shutdown method