call function to print result