refactoring and adjust param