remove some unneccecary white space (write.2dm)