Updated Main Program