Created function to define what rules will apply