implemented get messages and get messages test