Task 1 and 2 almost done; plots missing
final version and little cleanup