-main function now takes size of grid as an argument