complete test and add doc