testing and write_attribute fix