First exercise of Assignment 4, done.