finding diamond riches formula cppu