added cardinal tostring function