fixes of refactoring