How can we change the id of objects on the fly?