works for base case whee