Similar refactoring is needed here as well.