add freq and its test
add merge and its test