Initial write functionality