registration and localization