change variable length array to be pointer to array