unit test fix
add helper functions