refactor how current restriction is set