added functionality to check unread emails