generalize and comment parcel-based analysis code