added a print result method