clean up rule generation
write report