second part of homework assignment