modify prints and add rules in file