Optimized code
add  parameter "sub"
update style
add rules tests