Modified kraang translate algorithm