document and test more functions