fixed tests and added tests for 100% coverage