modification to main program