code: private void setLocation(List<Step> steps) {
  		List<Location> sublocations = new ArrayList<Location>();
  		int start = 0, step = 0, oStep = numBefore+numAfter, oMax = this.original.getLength(), pStep = 0, pMax =
  				(prev == null) ? 0 : prev.getLength();
  		boolean inGap = true;
  
  		// build sublocations: pieces of sequence separated by gaps
  		for (; step < length; step++) {
  			boolean isGapStep = (steps.get(step) == Step.GAP),
  					isGapPrev = (pStep < pMax && prev.isGap(pStep + 1));
  			if (!isGapStep && !isGapPrev) {
  				oStep++;
  				if (inGap) {
  					inGap = false;
  					start = step + 1;
  				}
  			} else if (!inGap) {
  				inGap = true;
  				sublocations.add(new SimpleLocation(start, step, Strand.UNDEFINED));
  			}
  			if (prev != null && !isGapStep) {
  				pStep++;
  			}
  		}
  		if (!inGap) {
  			sublocations.add(new SimpleLocation(start, step, Strand.UNDEFINED));
  		}
  
  		// combine sublocations into 1 Location
  		if (sublocations.size() == 0) {
  			location = null;
  		} else if (sublocations.size() == 1) {
  			location = sublocations.get(0);
  		} else {
  			location = new SimpleLocation(sublocations.get(0).getStart(), sublocations.get(sublocations.size() - 1).getEnd(),
  					Strand.UNDEFINED,
  					false, sublocations);
  		}
  		// TODO handle circular alignments
  
  		// check that alignment has correct number of compounds in it to fit original sequence
  		if (step != length || oStep != oMax || pStep != pMax) {
  			throw new IllegalArgumentException("Given sequence does not fit in alignment.");
  		}
  	}
docs: helper method to initialize the location