Rearranged rules to be more easily understandable