grid code example