implemented recursive print of plans