code for target translation