added a discard case if user enters the same number