a parte che non è ricorsiva, ma come fà a funzionare?