add rules
convert code