recurses only along the path (if provided) and returns the thing at the end