updated docstrings, added more tests