improves paneling code. mix of math and looking at the pixels from the mask