fixed new lines and spaces in api output