refactor(discovery): isolate function as partial functions