added return this in setMessages