implement #837