use a more pythonic way of getting the class name