docs, tests, fixed bug