added chan_func.go