fix Rule API type issue; added rule handling