fillGrid method implemented