setup code coverage and wrote more tests