several bugfixes and update docs
update source file