add the helper function for unit test
fix