Removing unused write variable