This avoids the struct type casting and having to pass a parameter that says which kind of struct it actually is.