translation logic