add memory blocks, and full tests for it