Changed ns slightly and added doc.