template: added parsing logic