got the base case working