add helper function.