add more tests and documentation