refactoring, code standards, see #6