Structs with methods example