working get all messages script