add nclasses support