update release script
add utility and refactor