reorders switch in Path()
adds function calls to text