nit: I think this would be more readable if it were `for (i = 0; i < symbols_nr; i++)