use seperate function for showing dialog for notification