use funciton and return a string content for template