rule function added