we should probably be using new here even though this is a C struct. It avoids the need for a cast entirey