zhang: modify rules output
refactor