tweaking js frontend stuff for rules