added a main
pprint fix
similitary is working and tested against the examples from the book