Added validn() and pcumsum().