Solution to 3 of the 7 problems from task 1