modified Grid constructor