group the result rules

gather same rules together