changed toPretty to override object's toString()