addign the id to the detail obj