Small adjustment on Magic Formula