First working version of parallel pava. Still does not support variable length of array