simplified version of codetrans