modified logic that convert to class name.