add global threshold test
threshold op passed to map op
histogram call cleaned up
gray level threshold returned