Replaced code up to Section 1