algorithm now is using the native for-loop, instead of underscore.js
fixed a bug, where the rules where not accessible