sum analyses code