Changed UD calculation