update latest messages dynamically