add helper function and usage