added support for class names instead of objects