Add sink operator

close #376