add assignment 2 recursive way