added read/unread messages functionality