made localization into a class