Completed the main program