first integrate with template and instances