reversed merge orientation
implemented parallel execution
changed order of tests and fixed as the number of array fields are checked