finding references to used functions