added more tests
improved code