ENH: address discussion, improve tests