refactoring & bugfix