mocked up recursive function and started parsing return