added option for automatic generation of class numbers from annotations