added actual calculation of hash in bricks