[master] a sketch of a new algorithm; not tested yet