solve timing problem for testIfBrickParts

cleanup code