refactor of CodeMaker