ad function to get unread items