added a helper for structs with hash based constructor
added a helper for structs with hash based constructor