Created function to output if result is found