solution for task 3