shutdown method implemented