refactored fetchClassInfo, see #476