added custom base class support for structs