Works for the example in the pdf now.

Still doesnt print correctly to ast