add from index to MessageType function
update DB struct , MessageType as dictionary table