Rules logic hopefully completed