bugfixes and documentation added