add program now changed to not detect duplicate input