Adding shutdown method