added calculation for new rank on cap; it compiles, untested