initial work on #684