consolidating alignment functions