Computing the measures