added CPS transform from moo, modified it to use the pattern matcher