refactoring (not yet completed)
refactoring Part II