add codes for constructing a linear spatial pyramid