Corrected homework 1 (v2)