reverting back to looping over ids