starting my recursive solution

and separating out what's in there