added more tests
minor formatting and documentation