Homework 3

final version, Q4 is not covered