chaging namespacedef to struct def