add consistency alignment code