implement #773