use only one function call for print_passed and print_failed