framework upstream refactoring