work on two-sided generators, not complete