replacing ids with unique hash