added reading and checking of band pixel values