Assignment 3, first problem solved