Dynamic km -> mi switch functioning