works with different color image types. Added paralellism back