added some tests, updated docs