makes sure the rules are followed