added nesting for the code to stop if the first input does not match. Still getting an extra alert that should not pop up and trying ti figure out why