handle multiple messages