refactoring and ranking design