task3 was implemented