Tweek pipe generation alg