refactor transpile example