bug fix + refactoring