begin unit test function