added mark as read functionality for thread