update alignment calculation