added doc, tests