added fucntion to check for duplicate, placed print statements to check for accuracy, tests still pass