added replace to handle new line