use calloc for dynamic array size