add callback
improve documentation