Added solution for task 4