break out into functions by rule