just desugar s5 code