implemented data duplicating on write