latest adjustments with some fixes on alignment output