Use recursive template