add all_aligned
fix all_aligned and add test