moved out structs and common histogram definitions
moved out structs and common histogram definitions