Adding behaviours to structs