form and template functions for discussions