Got rules working