modification to adapt alignments to new code