fixed up the structer creation code - hopefully should comppile now without warnings