auto recognise part-class