Add some function for template