updated docs, added tests