some improvements of localization