add task 3 code and doc