somehow alignment speeds up the triangle code