framework refactor