change getMessages to messages.