recursion in, first test case. Thanks @vjovanov