Wrote the method to evaluate Rules and some changes in other classes to work