add return of last cat id while saving