added loop to aligater