Added indexing for messages