integrating density estimation with tuple processing