tests and documentation

some tests and documentation added