Assigment 1 solution