adding shutdown to close