first stab at integrating Colin's alignmer