Homework 3, first problem done