Original solutions to task2, task3 and task4