implemented core shutdown