creates units array + debug