transform does not need to write undefined at end
added newlines transform