reorganize rule test's method