add functional testing with code coverage