bugfixes and suggestions added