Added problem 163 base case