better class pattern identification #16