bug fix for task2