Add the 1st version code. serveral unit test OK. need more unit test