changed max_messages to 5