added more tests and refactoring of tests