adding shutdown behavior