write units line by line