changes in the  struct creation  function