use variable length array