encapsulate classinfo better