adding shutdown function