calloc instead, prevents some seg faults for large arrays