Solution to task5