refactoring
bugfixes