expandArrayList without segdefault cant get free
three working functions