modified grid-maker for parsing arguments