giving up on histogram stats
blank detection code works