Add a function to convert the string numbers to int, and change/refine the structure of the main program