moving code around
adjust clean_rulings