finished rudimentary localization