commit init version of code

init version, including test function