cleaning up and adding localization