Adding logic to partition image. Parallel algorith test is failing