make algorithms better suited for additional gf-classes