Initial grid code