added rule4 and rule 5