add id to attributes if it is not already included