alignment moved to saparate function