added pretty printing functino