template parser logic started