Did the first question of homework1