added support for newline