added all the code but the recursion not working properly