My solution to assigment 1