assing id to newly created elements