made rules case classes for pretty toString