splitting out grid code from disc code