Added the logic for missing numbers
Took out the debugging code