initial integration between grid and main program