add corner case unit test function