modify shutdown function