added grid and normalize