copy extra attributes as a new dictionary to avoid overwriting existing values
removed commented out code