add shutdown method to classes