Consider to add a unit test for this function.