small changes added for running time (works on prediction map, but not on rawImage)