modify writeblock logic