helpers for discovering functions