typeTo => discriminator
polymorphics can now be declared using object