added main program block