dynamically allocate all arrays