Solved 2 parts of assignment 1