Refactoring the flexible setting function with extra param.