Added functionality to task 4.1