this refactoring may have been way too ambitious...