conditions to print out results