added newline handler in MessageHandler