added API to compute signature of each element.