added base shutdown function