begin write