Added partition method for collections