Added parallel calculations of min, max and its position