added some code for localization