task 2a implemented