one bug in the initial write fixed