methods of structs