added grid and fill grid method