Assignment 1 & 2 - solution