refactoring
refactoring
some smaller improvements