Updated with extra credit, only gets last message received