prettyPrint now works for circular list