JBRULES-3656: Solution that passes tests

Please disregard pull request 148 and review this one instead