add fillGrid function