rewrite task tests and add named function task declaration