funtions and templates for comment