some improvements to the private messages function