basic refactoring for bytecodeTranslator