updating the main program