code improvements
bugfixes