extracting processing to grid module