refactoring and imaging additions