fix tests. Enhance documentation