variable elimination, pretty class ext