Added function for the array with rules