works now, if only one class is given