peg and treefn