refactor compiler