handle newlines, fixes #42