reorganize the rendering of the substitution history layout