updated main program