moved output and finished problem 2
Problem 3 and Problem 4 with a reduced set for testing