changed var to val in Rule constructor