init a struct.