some fixes
refactoring
refactoring