experimental class syntax
switch to class syntax, add type prop, rename type method to typeOf