as close to Shih-Chieh's analysis as I could do