#173 improve documentation of code