add rich classes and tests