add some class id matching (from Christoph Biedl)