first version of the general translatoon algo without nested calls