refactoring
add res