collector function is tested ok.