implemented saving of blocks, partial implementation of loading