Dril algorithm rewrite, CS localization