Working solution to ex 1.3