merge
add extract script function