implemented hot/dead pixel detection and removal