add unit test and fist implement