added more tests and improved readability in unit tests