HW9:task2: code for debug