change to write float32 instead of float64