more reliable function call detection