added grid and flow