implement feature #846