refactoring: better logic and indentation
Merge pull request #1 from chrox/refactoring

refactoring: better logic and indentation