gen type init method