added API doc, improved