Question: How to extract the names of the functions?

Hi, 

I have an expression like this one 
x := -h(U) + f( f( g( f(U+W*X)*V) + g( f(W)*g(V) ) ) );
I and I would like to extract the names f, g, h of the functions it contains.
I'v been stucked on this problem for a while and I finally found this could be done doing this 
op~(0, indets(x, function({name, `+`, `*`})))

I don't understand why this works not even if it is the good way to proceed (the few examples I've built seem to prove this command works).
What way would you use to tackle this problem?

TIA

Please Wait...