Can we add unit test for this function?