Transformation of left terminating programs