refactor tanslator