refactoring/improving
refactoring
minor fixes