added a truly ruled based solution