last row is now correctly written and the datatype for output is se4t correctly