removes extra newlines