You define grid here but, I do not see it used anywhere besides line#69