added some tools for structs