Move the translate step to inside define_method