swap beacons in getPos algo