*added a function to copy format attributes