Solved 313 base case