fix doc, add more tests