remove listmessages function