second homework, modified