refactoring out more special-case code (may come back later in some form or other)