Added recursive option to challenge3
completed recursive option for chal3