refactoring; resolving loose ends