bugfix: refactoring