added some methods for BC with third-party templates