renamed and refactored DiscoverHandler