Added alignment code