type to constructor