added serialization to MapGrid