adapt upstream