ignore border when looking for bad pixels
some comments