Solution to brick wall problem.