Add addfunction() to add functions to tasks or contests