added typename keyword in template declaration