add method for printing result