Assignment 3 and part of 4