continuation of major refactoring...