updated brickdetector