Added the 'id' parameter to the loop