developed simple read/write grid functions