correct documentation, add tests